import {
  Column,
  CreateDateColumn,
  Entity,
  PrimaryGeneratedColumn,
  UpdateDateColumn,
} from 'typeorm';

@Entity()
export class Photo {
  @PrimaryGeneratedColumn()
  id: number;

  @CreateDateColumn()
  createdTime: Date;

  @UpdateDateColumn()
  updatedTime: Date;

  @Column({ comment: '名称', nullable: true })
  name: string;

  @Column({ comment: '描述', nullable: true })
  description: string;

  @Column({ comment: '文件名称', nullable: true })
  filename: string;

  @Column({ comment: '视图', nullable: true })
  views: number;

  @Column({ comment: '是否发布', default: false })
  isPublished: boolean;
}
